import { generate } from "./codegen";
import { parse } from "./parse";

export function compile(template) {
    // 把模板字符串解析为ast抽象语法树
    const ast = parse(template)
    // 遍历ast抽象语法树生成渲染函数
    return generate(ast)

}